<!DOCTYPE html>
<html lang="en">
  <head>
    <title>LYViewConvenienceFunc Structure Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>
    <a name="//apple_ref/swift/Struct/LYViewConvenienceFunc" class="dashAnchor"></a>
    <a title="LYViewConvenienceFunc Structure Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">LYConvenienceKitTest 1.0.0 Docs</a> (75% documented)</p>
        <div class="header-right">
          <form role="search" action="../search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>
        </div>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">LYConvenienceKitTest Reference</a>
        <img id="carat" src="../img/carat.png" alt=""/>
        LYViewConvenienceFunc Structure Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions.html#/c:objc(cs)NSBundle">Bundle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Date.html">Date</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Dictionary.html">Dictionary</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Double.html">Double</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions.html#/c:objc(cs)NSMutableAttributedString">NSMutableAttributedString</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/String.html">String</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions.html#/c:objc(cs)UICollectionViewFlowLayout">UICollectionViewFlowLayout</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIColor.html">UIColor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIColor/LYColorStyle.html">– LYColorStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIColor/LYGradientColorDirection.html">– LYGradientColorDirection</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions.html#/c:objc(cs)UIImage">UIImage</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIView.html">UIView</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Functions.html#/s:20LYConvenienceKitTest8LYAppLog_8fileName06methodG010lineNumberyx_S2SSitlF">LYAppLog(_:fileName:methodName:lineNumber:)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/LYBundleConvenience.html">LYBundleConvenience</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/LYCollectionViewFlowLayoutConvenience.html">LYCollectionViewFlowLayoutConvenience</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/LYImageConvenience.html">LYImageConvenience</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/LYMutableAttributedStringConvenience.html">LYMutableAttributedStringConvenience</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/LYViewConvenience.html">LYViewConvenience</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/LYDateConvenienceFunc.html">LYDateConvenienceFunc</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYDictionaryConvenienceFunc.html">LYDictionaryConvenienceFunc</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYDoubleConvenienceFunc.html">LYDoubleConvenienceFunc</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYMixtureAttribute.html">LYMixtureAttribute</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYScreenSize.html">LYScreenSize</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYStringConvenienceFunc.html">LYStringConvenienceFunc</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYViewConvenienceFunc.html">LYViewConvenienceFunc</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYViewConvenienceFunc/LYUIBorderSideType.html">– LYUIBorderSideType</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>LYViewConvenienceFunc</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">LYViewConvenienceFunc</span></code></pre>

                </div>
              </div>
            <p>Undocumented</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest21LYViewConvenienceFuncVyACSo6UIViewCcfc"></a>
                    <a name="//apple_ref/swift/Method/init(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest21LYViewConvenienceFuncVyACSo6UIViewCcfc">init(_:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">internal</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">view</span><span class="p">:</span> <span class="kt">UIView</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/%E5%8F%96%E5%BE%97%E8%A7%86%E5%9B%BE%E8%BD%AC%E5%8C%96%E5%90%8E%E7%9A%84%E5%9B%BE%E7%89%87%28%E6%88%AA%E5%9B%BE%29"></a>
                <a name="//apple_ref/swift/Section/取得视图转化后的图片(截图)" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/%E5%8F%96%E5%BE%97%E8%A7%86%E5%9B%BE%E8%BD%AC%E5%8C%96%E5%90%8E%E7%9A%84%E5%9B%BE%E7%89%87%28%E6%88%AA%E5%9B%BE%29"></a>
                  <h3 class="section-name"><span>取得视图转化后的图片(截图)</span>
</h3>
                </div>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest21LYViewConvenienceFuncV8getImageSo7UIImageCyF"></a>
                    <a name="//apple_ref/swift/Method/getImage()" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest21LYViewConvenienceFuncV8getImageSo7UIImageCyF">getImage()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>获取View图片(截图)</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">getImage</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt">UIImage</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/%E5%8F%96%E5%BE%97%E8%A7%86%E5%9B%BE%E6%89%80%E5%9C%A8%E7%9A%84%E6%8E%A7%E5%88%B6%E5%99%A8"></a>
                <a name="//apple_ref/swift/Section/取得视图所在的控制器" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/%E5%8F%96%E5%BE%97%E8%A7%86%E5%9B%BE%E6%89%80%E5%9C%A8%E7%9A%84%E6%8E%A7%E5%88%B6%E5%99%A8"></a>
                  <h3 class="section-name"><span>取得视图所在的控制器</span>
</h3>
                </div>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest21LYViewConvenienceFuncV14viewControllerSo06UIViewH0CSgyF"></a>
                    <a name="//apple_ref/swift/Method/viewController()" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest21LYViewConvenienceFuncV14viewControllerSo06UIViewH0CSgyF">viewController()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>取得视图所在的控制器</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">viewController</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt">UIViewController</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/%E8%AE%BE%E7%BD%AE%E8%A7%86%E5%9B%BElayer"></a>
                <a name="//apple_ref/swift/Section/设置视图layer" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/%E8%AE%BE%E7%BD%AE%E8%A7%86%E5%9B%BElayer"></a>
                  <h3 class="section-name"><span>设置视图layer</span>
</h3>
                </div>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest21LYViewConvenienceFuncV11layerShadow5color10offsetSize7opacity6radiusySo7UIColorC_So6CGSizeVSf12CoreGraphics7CGFloatVtF"></a>
                    <a name="//apple_ref/swift/Method/layerShadow(color:offsetSize:opacity:radius:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest21LYViewConvenienceFuncV11layerShadow5color10offsetSize7opacity6radiusySo7UIColorC_So6CGSizeVSf12CoreGraphics7CGFloatVtF">layerShadow(color:<wbr>offsetSize:<wbr>opacity:<wbr>radius:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>设置阴影</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">layerShadow</span><span class="p">(</span><span class="nv">color</span><span class="p">:</span><span class="kt">UIColor</span> <span class="o">=</span> <span class="o">.</span><span class="n">black</span><span class="p">,</span>
                 <span class="nv">offsetSize</span><span class="p">:</span><span class="kt">CGSize</span> <span class="o">=</span> <span class="kt">CGSize</span><span class="p">(</span><span class="nv">width</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="mi">0</span><span class="p">),</span>
                 <span class="nv">opacity</span><span class="p">:</span><span class="kt">Float</span> <span class="o">=</span> <span class="mf">0.1</span><span class="p">,</span>
                 <span class="nv">radius</span><span class="p">:</span><span class="kt">CGFloat</span> <span class="o">=</span> <span class="mf">5.0</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest21LYViewConvenienceFuncV20layerRoundingCorners7corners6radiusySo12UIRectCornerV_12CoreGraphics7CGFloatVtF"></a>
                    <a name="//apple_ref/swift/Method/layerRoundingCorners(corners:radius:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest21LYViewConvenienceFuncV20layerRoundingCorners7corners6radiusySo12UIRectCornerV_12CoreGraphics7CGFloatVtF">layerRoundingCorners(corners:<wbr>radius:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>设置部分圆角</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">layerRoundingCorners</span><span class="p">(</span><span class="nv">corners</span><span class="p">:</span> <span class="kt">UIRectCorner</span><span class="p">,</span> <span class="nv">radius</span><span class="p">:</span> <span class="kt">CGFloat</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest21LYViewConvenienceFuncV18LYUIBorderSideTypeV"></a>
                    <a name="//apple_ref/swift/Struct/LYUIBorderSideType" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest21LYViewConvenienceFuncV18LYUIBorderSideTypeV">LYUIBorderSideType</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>边框位置</p>

                        <a href="../Structs/LYViewConvenienceFunc/LYUIBorderSideType.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">LYUIBorderSideType</span> <span class="p">:</span> <span class="kt">OptionSet</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest21LYViewConvenienceFuncV11layerBorder5color5width4typeySo7UIColorC_12CoreGraphics7CGFloatVAC18LYUIBorderSideTypeVtF"></a>
                    <a name="//apple_ref/swift/Method/layerBorder(color:width:type:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest21LYViewConvenienceFuncV11layerBorder5color5width4typeySo7UIColorC_12CoreGraphics7CGFloatVAC18LYUIBorderSideTypeVtF">layerBorder(color:<wbr>width:<wbr>type:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>设置部分边框(注意：要先设置视图的frame)</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">layerBorder</span><span class="p">(</span><span class="nv">color</span><span class="p">:</span> <span class="kt">UIColor</span><span class="p">,</span> <span class="nv">width</span><span class="p">:</span> <span class="kt">CGFloat</span><span class="p">,</span> <span class="nv">type</span><span class="p">:</span> <span class="kt"><a href="../Structs/LYViewConvenienceFunc/LYUIBorderSideType.html">LYUIBorderSideType</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2021 <a class="link" href="https://github.com/liuyik/LYConvenienceKit.git" target="_blank" rel="external noopener">liuyik</a>. All rights reserved. (Last updated: 2021-11-18)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</html>
